Top Description Fields Constructors Methods
org.h2.command.ddl

public Class CreateUser

extends DefineCommand
Class Inheritance
Imports
org.h2.api.ErrorCode, org.h2.command.CommandInterface, org.h2.engine.Database, .RightOwner, .SessionLocal, .User, org.h2.expression.Expression, org.h2.message.DbException, org.h2.security.SHA256, org.h2.util.StringUtils, org.h2.value.DataType, .Value

This class represents the statement CREATE USER

Field Summary

Modifier and TypeField and Description
private boolean
private String
private Expression
private boolean
private Expression
private Expression
private String
Inherited from org.h2.command.ddl.DefineCommand:
transactional

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static byte[]
public int
getType()

Implements abstract org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

public void
setAdmin(boolean b)

public void
setComment(String comment)

public void
public void
setIfNotExists(boolean ifNotExists)

public void
pack-priv static void
setPassword(User
the user
user
,
SessionLocal
the session
session
,
Expression
the password
password
)

Set the password for the given user.

public void
pack-priv static void
setSaltAndHash(User
the user
user
,
SessionLocal
the session
session
,
Expression
the salt
salt
,
Expression
the hash
hash
)

Set the salt and hash for the given user.

public void
setUserName(String userName)

public long
update()

Overrides org.h2.command.Prepared.update.

Execute the statement.

Inherited from org.h2.command.ddl.DefineCommand:
isReadOnlyisRetryableisTransactionalqueryMetasetTransactional

Field Detail

adminback to summary
private boolean admin
commentback to summary
private String comment
hashback to summary
private Expression hash
ifNotExistsback to summary
private boolean ifNotExists
passwordback to summary
private Expression password
saltback to summary
private Expression salt
userNameback to summary
private String userName

Constructor Detail

CreateUserback to summary
public CreateUser(SessionLocal session)

Method Detail

getByteArrayback to summary
private static byte[] getByteArray(SessionLocal session, Expression e)
getTypeback to summary
public int getType()

Implements abstract org.h2.command.Prepared.getType.

Doc from org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

Returns:int

the statement type

Annotations
@Override
setAdminback to summary
public void setAdmin(boolean b)
setCommentback to summary
public void setComment(String comment)
setHashback to summary
public void setHash(Expression e)
setIfNotExistsback to summary
public void setIfNotExists(boolean ifNotExists)
setPasswordback to summary
public void setPassword(Expression password)
setPasswordback to summary
pack-priv static void setPassword(User user, SessionLocal session, Expression password)

Set the password for the given user.

Parameters
user:User

the user

session:SessionLocal

the session

password:Expression

the password

setSaltback to summary
public void setSalt(Expression e)
setSaltAndHashback to summary
pack-priv static void setSaltAndHash(User user, SessionLocal session, Expression salt, Expression hash)

Set the salt and hash for the given user.

Parameters
user:User

the user

session:SessionLocal

the session

salt:Expression

the salt

hash:Expression

the hash

setUserNameback to summary
public void setUserName(String userName)
updateback to summary
public long update()

Overrides org.h2.command.Prepared.update.

Doc from org.h2.command.Prepared.update.

Execute the statement.

Returns:long

the update count

Annotations
@Override