Guten Tag Lukas Eder,
am Freitag, 7. Februar 2020 um 17:04 schrieben Sie:

> It's a lot of code. If you could TL;DR-summarize it with 6-7 lines, I'll be
> happy to look at it.

Couldn't reduce less, so if it's still too much, nevermind, I'll deal
with it when executed and in case it breaks. I know what to do now
thanks to you!

> import static 
> de.am_soft.sm_mtg.backend.daos.db.reports.meter_cnt.last_month.MclmSchema.RECS_IN_TIME_PERIOD;
> import static 
> de.am_soft.sm_mtg.backend.daos.db.reports.meter_cnt.last_month.MclmSchema.RE_AND_CLT_PER_METER_LID;

> return RE_AND_CLT_PER_METER_LID.NAME
>   .fields(RE_AND_CLT_PER_METER_LID.COL_METER_MFCT_CODE.getName())
>   .as(DSL.select(RECS_IN_TIME_PERIOD.COL_METER_MFCT_CODE)
>          .from(RECS_IN_TIME_PERIOD.NAME));

My schema, which is NOT generated using the generator, that was only
some other test. Prefer this for now, if it works:

> class MclmSchema
> {
>   static class RecsInTimePeriod {
>     private RecsInTimePeriod() {}
>
>     final Name           NAME            = DSL.name ("recs_in_time_period");
>     final Field<Integer> COL_RC_USER_ID  = DSL.field("rc_user_id", 
> READING_COMPANY.USER_ID.getDataType());
>   }
>
>   static class ReAndCltPerMeterLid {
>     private ReAndCltPerMeterLid() {}
>
>     final Name                 NAME                = DSL.name 
> ("re_and_clt_per_meter_lid");
>     final Field<MeterMfctCode> COL_METER_MFCT_CODE = 
> DSL.field("meter_mfct_code", METER.MFCT_CODE.getDataType());
>   }
>
>   static final RecsInTimePeriod    RECS_IN_TIME_PERIOD      = new 
> RecsInTimePeriod();
>   static final ReAndCltPerMeterLid RE_AND_CLT_PER_METER_LID = new 
> ReAndCltPerMeterLid();
> }

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/392681840.20200207183805%40am-soft.de.
import static 
de.am_soft.sm_mtg.backend.daos.db.reports.meter_cnt.last_month.MclmSchema.RECS_IN_TIME_PERIOD;
import static 
de.am_soft.sm_mtg.backend.daos.db.reports.meter_cnt.last_month.MclmSchema.RE_AND_CLT_PER_METER_LID;

return RE_AND_CLT_PER_METER_LID.NAME
  .fields
  (
    RE_AND_CLT_PER_METER_LID.COL_METER_MFCT_CODE.getName(),
  )
  .as
  (
    DSL.select
    (
      RECS_IN_TIME_PERIOD.COL_METER_MFCT_CODE,
    )
    .from(RECS_IN_TIME_PERIOD.NAME)
  );
class MclmSchema
{
  static class RecsInTimePeriod
  {
    private RecsInTimePeriod() {}

    final Name           NAME            = DSL.name ("recs_in_time_period");
    final Field<Integer> COL_RC_USER_ID  = DSL.field("rc_user_id", 
READING_COMPANY.USER_ID.getDataType());
  }

  static class ReAndCltPerMeterLid
  {
    private ReAndCltPerMeterLid() {}

    final Name                 NAME                = DSL.name 
("re_and_clt_per_meter_lid");
    final Field<MeterMfctCode> COL_METER_MFCT_CODE = 
DSL.field("meter_mfct_code", METER.MFCT_CODE.getDataType());
  }

  static final RecsInTimePeriod    RECS_IN_TIME_PERIOD      = new 
RecsInTimePeriod();
  static final ReAndCltPerMeterLid RE_AND_CLT_PER_METER_LID = new 
ReAndCltPerMeterLid();
}

Reply via email to