skip to Main Content

Postgresql – How can I select a Long[] field into my pojo from a lateral join using arrayAgg()?

Here is an example of the query I'm trying to execute and the POJO I'm trying to populate. public Optional<TeacherWithStudents> getTeachersWithStudentsForStudentId(long studentId) { return ctx().select( TEACHER.ID, TEACHER.NAME, DSL.field("student.ids", STUDENT_TEACHER_MAPPING.STUDENT_ID.getDataType().getArrayType())) .from(TEACHER) .leftJoin(DSL.lateral( DSL.select(DSL.arrayAgg(STUDENT_TEACHER_MAPPING.STUDENT_ID).as("ids")) .from(STUDENT_TEACHER_MAPPING) .where(STUDENT_TEACHER_MAPPING.TEACHER_ID.eq(TEACHER.ID))).as("student")) .on(DSL.condition(true)) .limit(1) .fetchOptionalInto(TeacherWithStudents.class); } // TeacherWithStudents…

VIEW QUESTION

How do I delete a Redis Index using Jedis?

I am trying to delete a index using Jedis. I have the following... public void deleteAll() { // Optionally drop and recreate the index try (Connection connection = jedis.getPool().getResource()) { if (connection.isConnected()) { connection.sendCommand(SearchProtocol.SearchCommand.DROPINDEX, "DROPINDEX", "spring-ai-example", "DD"); // Use your…

VIEW QUESTION

Flutter – Android Gradle plugin requires Java 17 to run. You are currently using Java 11. in window system

Launching libmain.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... FAILURE: Build failed with an exception. * Where: Build file 'C:UsersviranStudioProjectsk_walzy_appandroidappbuild.gradle' line: 2 * What went wrong: An exception occurred applying plugin request [id: 'com.android.application']…

VIEW QUESTION

Android Studio – RecognizerIntent.EXTRA_LANGUAGE doesn't change Recongnizer language suddenly

I have a code in my application which recognize "Persian" language and make a Speech-to-text function: Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "fa"); intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak..."); but now it's suddenly stopped working and just recognize my STT as English!…

VIEW QUESTION
Back To Top
Search