コード例 #1
0
        public static string FieldName(PhpResource resultHandle, int fieldIndex)
        {
            PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle);

            if (result == null)
            {
                return(null);
            }

            return(result.GetFieldName(fieldIndex));
        }
コード例 #2
0
        private static PhpObject FetchFieldInternal(PhpSqlDbResult /*!*/ result, int fieldIndex)
        {
            DataRow info = result.GetSchemaRowInfo(fieldIndex);

            if (info == null)
            {
                return(null);
            }

            string    s;
            PhpObject obj      = new stdClass();
            string    php_type = result.GetPhpFieldType(fieldIndex);

            obj.Add("name", result.GetFieldName(fieldIndex));
            obj.Add("column_source", (s = info["BaseColumnName"] as string) != null ? s : "");
            obj.Add("max_length", result.GetFieldLength(fieldIndex));
            obj.Add("numeric", result.IsNumericType(php_type) ? 1 : 0);
            obj.Add("type", php_type);

            return(obj);
        }
コード例 #3
0
ファイル: MsSql.cs プロジェクト: kripper/Phalanger
		private static PhpObject FetchFieldInternal(PhpSqlDbResult/*!*/ result, int fieldIndex)
		{
			DataRow info = result.GetSchemaRowInfo(fieldIndex);
			if (info == null) return null;

			string s;
			PhpObject obj = new stdClass();
			string php_type = result.GetPhpFieldType(fieldIndex);

			obj.Add("name", result.GetFieldName(fieldIndex));
			obj.Add("column_source", (s = info["BaseColumnName"] as string) != null ? s : "");
			obj.Add("max_length", result.GetFieldLength(fieldIndex));
			obj.Add("numeric", result.IsNumericType(php_type) ? 1 : 0);
			obj.Add("type", php_type);

			return obj;
		}