Added SwitchPageReader and SwitchPageBuilder utilities. #191

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@frsyuki
Contributor
frsyuki commented May 28, 2015

The goal is to make type system extensible without breaking plugin API
compatibility.

  • SwitchPageReader calls ValueSwitch#whenXxx methods where Xxx is name
    of a type. If a plugin does not know type Xxx, whenElse method is
    called. Plugins must implement whenElse and whenNull methods at least.
  • SwitchPageBuilder calls ColumnSwitch#whenXxx methods where Xxx is name
    of a type. If a plugin does not implement those methods, calling those
    methods cause a exception. But as long as the methods are not called,
    plugin loading itself succeeds and plugin runs without exception.

The next step is to add array/map/json/decimal type support (#120).

@frsyuki frsyuki Added SwitchPageReader and SwitchPageBuilder utilities.
The goal is to make type system extensible without breaking plugin API
compatibility.

* SwitchPageReader calls ValueSwitch#whenXxx methods where Xxx is name
  of a type. If a plugin does not know type Xxx, whenElse method is
  called. Plugins must implement whenElse and whenNull methods at least.
* SwitchPageBuilder calls ColumnSwitch#whenXxx methods where Xxx is name
  of a type. If a plugin does not implement those methods, calling those
  methods cause a exception. But as long as the methods are not called,
  plugin loading itself succeeds and plugin runs without exception.
6815234
@frsyuki
Contributor
frsyuki commented Sep 15, 2015

This is redesigned and taken over by #306.

@frsyuki frsyuki closed this Sep 15, 2015
@sakama sakama deleted the extensible-type branch Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment