Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix numeric scale/precision schema info |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
f7f8595cb87d0f877de0b42ebd90b3ac |
User & Date: | rmsimpson 2006-05-15 14:24:00.000 |
Context
2006-05-15
| ||
14:44 | CF adjustments check-in: 2f5efd135b user: rmsimpson tags: sourceforge | |
14:24 | Fix numeric scale/precision schema info check-in: f7f8595cb8 user: rmsimpson tags: sourceforge | |
03:54 | Fix automatic transaction enlistment check-in: d5b529f8e1 user: rmsimpson tags: sourceforge | |
Changes
Changes to System.Data.SQLite/SQLiteDataReader.cs.
︙ | ︙ | |||
502 503 504 505 506 507 508 509 510 511 512 513 514 515 | temp = _command.Connection._sql.ColumnTableName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableColumn.BaseTableName] = temp; temp = _command.Connection._sql.ColumnDatabaseName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableOptionalColumn.BaseCatalogName] = temp; // If we have a table-bound column, extract the extra information from it if (String.IsNullOrEmpty(strColumn) == false) { string collSeq; string dataType; bool bNotNull; | > > | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | temp = _command.Connection._sql.ColumnTableName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableColumn.BaseTableName] = temp; temp = _command.Connection._sql.ColumnDatabaseName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableOptionalColumn.BaseCatalogName] = temp; if (GetSQLiteType(n).Type != DbType.String && GetSQLiteType(n).Type != DbType.Binary) row[SchemaTableColumn.ColumnSize] = System.Runtime.InteropServices.Marshal.SizeOf(GetFieldType(n)); // If we have a table-bound column, extract the extra information from it if (String.IsNullOrEmpty(strColumn) == false) { string collSeq; string dataType; bool bNotNull; |
︙ | ︙ | |||
532 533 534 535 536 537 538 | // For types like varchar(50) and such, extract the size arSize = dataType.Split('('); if (arSize.Length > 1) { dataType = arSize[0]; arSize = arSize[1].Split(')'); if (arSize.Length > 1) | > > > > | > > > > > > > > | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | // For types like varchar(50) and such, extract the size arSize = dataType.Split('('); if (arSize.Length > 1) { dataType = arSize[0]; arSize = arSize[1].Split(')'); if (arSize.Length > 1) { arSize = arSize[0].Split(',', '.'); if (GetSQLiteType(n).Type == DbType.String || GetSQLiteType(n).Type == DbType.Binary) { row[SchemaTableColumn.ColumnSize] = Convert.ToInt32(arSize[0], CultureInfo.InvariantCulture); } else { row[SchemaTableColumn.NumericPrecision] = Convert.ToInt32(arSize[0], CultureInfo.InvariantCulture); if (arSize.Length > 1) row[SchemaTableColumn.NumericScale] = Convert.ToInt32(arSize[1], CultureInfo.InvariantCulture); } } } row["DataTypeName"] = dataType; if (wantDefaultValue) { // Determine the default value for the column, which sucks because we have to query the schema for each column |
︙ | ︙ |