leo_s3_bucket_data_handler

The bucket record handler.

References

Description

The bucket record handler

Function Index

delete/2 Remove a record from the table.
find_all/1 Retrieve all buckets.
find_by_name/2 Retrieve a record by name.
find_by_name/3  
find_by_name/4  
insert/2 Insert a record into the table.
lookup/2  
size/1 Retrieve total of records.

Function Details

delete/2

delete(DBInfo, Bucket) -> ok | {error, any()}

  • DBInfo = {mnesia | ets, atom()}
  • Bucket = #'?BUCKET'{}

Remove a record from the table.

find_all/1

find_all(DBInfo) -> {ok, [#'?BUCKET'{}]} | not_found | {error, any()}

  • DBInfo = {mnesia | ets, atom()}

Retrieve all buckets.

find_by_name/2

find_by_name(DBInfo, Name) -> {ok, #'?BUCKET'{}} | not_found | {error, any()}

  • DBInfo = {mnesia | ets, atom()}
  • Name = binary()

Retrieve a record by name

find_by_name/3

find_by_name(DBInfo, AccessKey, Name) -> {ok, #'?BUCKET'{}} | not_found | {error, any()}

  • DBInfo = {mnesia | ets, atom()}
  • AccessKey = binary()
  • Name = binary()

find_by_name/4

find_by_name(DBInfo, AccessKey0, Name, NeedAccessKey) -> {ok, #'?BUCKET'{}} | not_found | {error, any()}

  • DBInfo = {mnesia | ets, atom()}
  • AccessKey0 = binary()
  • Name = binary()
  • NeedAccessKey = boolean()

insert/2

insert(DBInfo, Bucket) -> ok | {error, any()}

  • DBInfo = {mnesia | ets, atom()}
  • Bucket = #'?BUCKET'{}

Insert a record into the table.

lookup/2

lookup(X1::{DB, Table}, AccessKey) -> {ok, [#'?BUCKET'{}]} | not_found | {error, any()}

  • DB = mnesia | ets
  • Table = atom()
  • AccessKey = binary()

size/1

size(DBInfo) -> non_neg_integer()

  • DBInfo = {mnesia | ets, atom()}

Retrieve total of records.