addressed review comments

This commit is contained in:
David Puglielli 2018-05-25 14:42:32 -07:00
parent bd9d85b862
commit 1747df1ced
9 changed files with 32 additions and 24 deletions

View file

@ -174,7 +174,7 @@ const int SQL_SERVER_MAX_PRECISION = 38;
const int SQL_SERVER_MAX_TYPE_SIZE = 0;
const int SQL_SERVER_MAX_PARAMS = 2100;
// increase the maximum message length to accommodate for the long error returned for operand type clash
const int SQL_MAX_ERROR_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH * 4;
const int SQL_MAX_ERROR_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH * 7;
// max size of a date time string when converting from a DateTime object to a string
const int MAX_DATETIME_STRING_LEN = 256;

View file

@ -6,9 +6,9 @@ Test client ID/secret credentials for Azure Key Vault for Always Encrypted.
<?php
require_once('pdo_ae_azure_key_vault_common.php');
$strsize = 64;
$dataTypes = array("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

View file

@ -33,9 +33,9 @@ function checkErrors($errors, ...$codes)
}
}
$strsize = 64;
$dataTypes = array("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

View file

@ -6,9 +6,9 @@ Test username/password credentials for Azure Key Vault for Always Encrypted.
<?php
require_once('pdo_ae_azure_key_vault_common.php');
$strsize = 64;
$dataTypes = array("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

View file

@ -788,6 +788,10 @@ $values[] = array(array(("C0A0B025C680B0A23D7885F7C203AD211F679679F97F910F0F1A36
null,
);
// For the $small_values array, the string size of 64 is large enough
// to hold every string value.
const SHORT_STRSIZE = 64;
// The bigint field must be inserted as a string to maintain accuracy
$small_values = array("qwerty",
"wertyu",

View file

@ -6,9 +6,9 @@ Test client ID/secret credentials for Azure Key Vault for Always Encrypted.
<?php
require_once('sqlsrv_ae_azure_key_vault_common.php');
$strsize = 64;
$dataTypes = array ("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

View file

@ -32,9 +32,9 @@ function checkErrors($errors, ...$codes)
}
}
$strsize = 64;
$dataTypes = array("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

View file

@ -6,9 +6,9 @@ Test username/password credentials for Azure Key Vault for Always Encrypted.
<?php
require_once('sqlsrv_ae_azure_key_vault_common.php');
$strsize = 64;
$dataTypes = array ("char($strsize)", "varchar($strsize)", "nvarchar($strsize)",
// The array of data types corresponding to $small_values in values.php.
// SHORT_STRSIZE is defined in values.php as well.
$dataTypes = array("char(".SHORT_STRSIZE.")", "varchar(".SHORT_STRSIZE.")", "nvarchar(".SHORT_STRSIZE.")",
"decimal", "float", "real", "bigint", "int", "bit"
);

File diff suppressed because one or more lines are too long