Package org.apache.calcite.chinook
Class EnvironmentFairy
- java.lang.Object
-
- org.apache.calcite.chinook.EnvironmentFairy
-
public class EnvironmentFairy extends java.lang.Object
Fairy simulates environment around Calcite.An example property is the user on whose behalf Calcite is running the current query. Other properties can change from one query to another. Properties are held in thread-locals, so it is safe to set a property then read it from the same thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnvironmentFairy.User
Who is emulated to being logged in?
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.ThreadLocal<EnvironmentFairy.User>
USER
-
Constructor Summary
Constructors Modifier Constructor Description private
EnvironmentFairy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EnvironmentFairy.User
getUser()
static void
login(EnvironmentFairy.User user)
-
-
-
Field Detail
-
USER
private static final java.lang.ThreadLocal<EnvironmentFairy.User> USER
-
-
Method Detail
-
getUser
public static EnvironmentFairy.User getUser()
-
login
public static void login(EnvironmentFairy.User user)
-
-