Package org.h2.command.ddl
Class CreateUser
java.lang.Object
org.h2.command.Prepared
org.h2.command.ddl.DefineCommand
org.h2.command.ddl.CreateUser
This class represents the statement
CREATE USER
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Stringprivate Expressionprivate booleanprivate Expressionprivate Expressionprivate StringFields inherited from class org.h2.command.ddl.DefineCommand
transactionalFields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]getByteArray(SessionLocal session, Expression e) intgetType()Get the command type as defined in CommandInterfacevoidsetAdmin(boolean b) voidsetComment(String comment) voidvoidsetIfNotExists(boolean ifNotExists) (package private) static voidsetPassword(User user, SessionLocal session, Expression password) Set the password for the given user.voidsetPassword(Expression password) void(package private) static voidsetSaltAndHash(User user, SessionLocal session, Expression salt, Expression hash) Set the salt and hash for the given user.voidsetUserName(String userName) longupdate()Execute the statement.Methods inherited from class org.h2.command.ddl.DefineCommand
isReadOnly, isTransactional, queryMeta, setTransactionalMethods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, isCacheable, isQuery, needRecompile, prepare, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString
-
Field Details
-
userName
-
admin
private boolean admin -
password
-
salt
-
hash
-
ifNotExists
private boolean ifNotExists -
comment
-
-
Constructor Details
-
CreateUser
-
-
Method Details
-
setIfNotExists
public void setIfNotExists(boolean ifNotExists) -
setUserName
-
setPassword
-
setSaltAndHash
Set the salt and hash for the given user.- Parameters:
user- the usersession- the sessionsalt- the salthash- the hash
-
getByteArray
-
setPassword
Set the password for the given user.- Parameters:
user- the usersession- the sessionpassword- the password
-
update
public long update()Description copied from class:PreparedExecute the statement. -
setSalt
-
setHash
-
setAdmin
public void setAdmin(boolean b) -
setComment
-
getType
public int getType()Description copied from class:PreparedGet the command type as defined in CommandInterface
-