The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Interchange6::Schema::Result::User

TABLE: users

ACCESSORS

users_id

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0
  sequence: 'users_users_id_seq'

username

  data_type: 'varchar'
  is_nullable: 0
  size: 255

The username is automatically converted to lowercase so we make sure that the unique constraint on username works.

nickname

  data_type: 'varchar'
  is_nullable: 1
  size: 255

nickname is automatically converted to lowercase

email

  data_type: 'varchar'
  default_value: (empty string)
  is_nullable: 0
  size: 255

password

  data_type: 'varchar'
  default_value: (empty string)
  is_nullable: 0
  size: 255
  encode_column: 1
  encode_class: 'Digest'
  encode_args: { algorithm => 'SHA-512', format => 'hex', salt_length => 10 }
  encode_check_method: 'check_password'

first_name

  data_type: 'varchar'
  default_value: (empty string)
  is_nullable: 0
  size: 255

last_name

  data_type: 'varchar'
  default_value: (empty string)
  is_nullable: 0
  size: 255

last_login

  data_type: 'datetime'
  is_nullable: 1

created

  data_type: 'datetime'
  set_on_create: 1
  is_nullable: 0

last_modified

  data_type: 'datetime'
  set_on_create: 1
  set_on_update: 1
  is_nullable: 0

active

  data_type: 'boolean'
  default_value: true
  is_nullable: 0

METHODS

add_attribute

Add user attribute.

$user->add_attribute('hair_color', 'blond');

Where 'hair_color' is Attribute and 'blond' is AttributeValue

update_attribute

Update user atttibute

$user->update_attribute('hair_color', 'brown');

delete_attribute

Delete user attribute

$user->delete_attribute('hair_color', 'purple');

find_attribute_value

Finds the attribute value for the current user or a defined user If $object is passed the entire attribute_value object will be returned

update_attribute_value

Finds the attribute value and updates it. Be careful to only update attribute values that are unique to that user or you could update multiple users.

find_or_create_attribute

Find or create attribute and attribute_value.

find_user_attribute_value

From a $user->attribute $user_attribute, $user_attribute_value is returned.

PRIMARY KEY

UNIQUE CONSTRAINTS

users_username

users_nickname

RELATIONS

Address

Type: has_many

Related object: Interchange6::Schema::Result::Address

Cart

Type: has_many

Related object: Interchange6::Schema::Result::Cart

Order

Type: has_many

Related object: Interchange6::Schema::Result::Order

UserAttribute

Type: has_many

Related object: Interchange6::Schema::Result::UserAttribute

UserRole

Type: has_many

Related object: Interchange6::Schema::Result::UserRole

roles

Type: many_to_many

Composing rels: "user_roles" -> role