Skip to content

Commit

Permalink
[#11] Demo code should link to relevant sections of the manual - Demo…
Browse files Browse the repository at this point in the history
…15ComputedColumns
  • Loading branch information
lukaseder committed Jan 11, 2024
1 parent c66e842 commit e5a8211
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@

public class Demo15ComputedColumns extends AbstractDemo {

// Computed columns are a commercial only feature
@Test
public void fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression");

// Computed columns are a commercial only feature

//
// @Test
// public void fetchVirtualClientSideComputedColumns() {
// ctx.select(STAFF.FULL_NAME, STAFF.FULL_ADDRESS)
// .from(STAFF)
// .fetch();
// }
//
//

// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
package org.jooq.demo.kotlin

import org.jooq.demo.AbstractDemo
import org.jooq.demo.kotlin.db.tables.references.*
import org.jooq.demo.kotlin.db.tables.references.STAFF
import org.junit.Test


class Demo15ComputedColumns : AbstractDemo() {

// Computed columns are a commercial only feature
@Test
fun fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression")

// Computed columns are a commercial only feature

//
// @Test
// fun fetchVirtualClientSideComputedColumns() {
// ctx.select(
// STAFF.FULL_NAME,
// STAFF.FULL_ADDRESS
// )
// .from(STAFF)
// .fetch()
// }
//
//

// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ import org.junit.Test

class Demo15ComputedColumns extends AbstractDemo {

// Computed columns are a commercial only feature
@Test
def fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression")

// Computed columns are a commercial only feature

//
// @Test
// def fetchVirtualClientSideComputedColumns() {
// ctx.select(STAFF.FULL_NAME, STAFF.FULL_ADDRESS)
// .from(STAFF)
// .fetch
// }
//
//

// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@

public class Demo15ComputedColumns extends AbstractDemo {

// Computed columns are a commercial only feature
/* [pro] */

@Test
public void fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression");

// Computed columns are a commercial only feature
/* [pro] */

ctx.select(STAFF.FULL_NAME, STAFF.FULL_ADDRESS)
.from(STAFF)
.fetch();
}

/* [/pro] */
/* [/pro] */

// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
package org.jooq.demo.kotlin

import org.jooq.demo.AbstractDemo
import org.jooq.demo.kotlin.db.tables.references.*
import org.jooq.demo.kotlin.db.tables.references.STAFF
import org.junit.Test


class Demo15ComputedColumns : AbstractDemo() {

// Computed columns are a commercial only feature
/* [pro] */

@Test
fun fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression")

// Computed columns are a commercial only feature
/* [pro] */

ctx.select(
STAFF.FULL_NAME,
STAFF.FULL_ADDRESS
)
.from(STAFF)
.fetch()
}
/* [/pro] */

/* [/pro] */
// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ import org.junit.Test

class Demo15ComputedColumns extends AbstractDemo {

// Computed columns are a commercial only feature
/* [pro] */

@Test
def fetchVirtualClientSideComputedColumns() {
title("Client side computed columns emulate their server side equivalents by inlining the computation expression")

// Computed columns are a commercial only feature
/* [pro] */

ctx.select(STAFF.FULL_NAME, STAFF.FULL_ADDRESS)
.from(STAFF)
.fetch
}
/* [/pro] */

/* [/pro] */
// More information here:
// - https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-forced-types/codegen-database-forced-types-computed/
}

}

0 comments on commit e5a8211

Please sign in to comment.