GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
wrappers
>
PREPARED_COMMAND
+
Point of view
All features
ANY
All features
deferred class PREPARED_COMMAND
Summary
top
copyright
(C) 2006 Paolo Redaelli
license
LGPL v2 or later
date
$Date:$
revision
$Revision:$
Direct parents
Inherit list:
PREPARED_STATEMENT
Known children
Inherit list:
SQLITE_PREPARED_COMMAND
Overview
top
Features
{
ANY
}
last_affected_rows
:
INTEGER_32
require success: last_exec_success
Creation
{}
make
(a_database:
DATABASE
, some_sql:
ABSTRACT_STRING
)
Makes a prepared command from
some_sql
{
ANY
}
parameter_count
:
INTEGER_32
The number of paramenters to be provided to execute the statement.
are_valid_parameters
(some_parameters:
TRAVERSABLE
[
VARIANT
]):
BOOLEAN
Are
some_parameters
valid for the current statement?
is_valid_parameter
(a_parameter:
VARIANT
, an_index:
INTEGER_32
):
BOOLEAN
Is
a_parameter
placeble in statement's
an_index
-th parameter?
execute
(some_parameters:
TRAVERSABLE
[
VARIANT
])
Execute the current SQL statment with
some_parameters
and set last_exec_success
State Status reporting for the prepared statement. The actual implementation of those features are backend depending
{
ANY
}
is_prepared
:
BOOLEAN
is_stepped
:
BOOLEAN
is_failed
:
BOOLEAN
last_exec_success
:
BOOLEAN
state
:
INTEGER_32
last_affected_rows
:
INTEGER_32
deferred function
{
ANY
}
top
require success: last_exec_success
make
(a_database:
DATABASE
, some_sql:
ABSTRACT_STRING
)
deferred procedure
{}
top
Makes a prepared command from
some_sql
require
database_not_void:
a_database /= Void
connected_database:
a_database.is_connected
sql_not_void:
some_sql /= Void
parameter_count
:
INTEGER_32
deferred function
{
ANY
}
top
The number of paramenters to be provided to execute the statement.
This number depends on
some_sql
passed to
make
feature.
are_valid_parameters
(some_parameters:
TRAVERSABLE
[
VARIANT
]):
BOOLEAN
effective function
{
ANY
}
top
Are
some_parameters
valid for the current statement?
require
state:
is_prepared
is_valid_parameter
(a_parameter:
VARIANT
, an_index:
INTEGER_32
):
BOOLEAN
deferred function
{
ANY
}
top
Is
a_parameter
placeble in statement's
an_index
-th parameter?
require
parameter_not_void:
a_parameter /= Void
valid_index:
an_index.in_range(1,
parameter_count
)
state:
is_prepared
execute
(some_parameters:
TRAVERSABLE
[
VARIANT
])
deferred procedure
{
ANY
}
top
Execute the current SQL statment with
some_parameters
and set last_exec_success
require
parameters_not_void:
some_parameters /= Void
correct_number_of_parameters:
some_parameters.count =
parameter_count
state:
is_prepared
valid_paramaters:
are_valid_parameters
(some_parameters)
is_prepared
:
BOOLEAN
deferred function
{
ANY
}
top
is_stepped
:
BOOLEAN
deferred function
{
ANY
}
top
is_failed
:
BOOLEAN
deferred function
{
ANY
}
top
last_exec_success
:
BOOLEAN
deferred function
{
ANY
}
top
state
:
INTEGER_32
writable attribute
{
ANY
}
top