Skip to content

Commit

Permalink
Bug 1313309 - Remove getColumnDecltype and compile with SQLITE_OMIT_D…
Browse files Browse the repository at this point in the history
…ECLTYPE. r=asuth

MozReview-Commit-ID: 2QR8P7ylg9m
  • Loading branch information
mak77 committed Nov 3, 2016
1 parent 4c490f4 commit 94cb1bf
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 40 deletions.
1 change: 1 addition & 0 deletions db/sqlite3/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
# Omit unused functions to save some library footprint.
DEFINES['SQLITE_OMIT_DEPRECATED'] = True
DEFINES['SQLITE_OMIT_BUILTIN_TEST'] = True
DEFINES['SQLITE_OMIT_DECLTYPE'] = True

# Suppress warnings in third-party code.
if CONFIG['GNU_CC']:
Expand Down
2 changes: 0 additions & 2 deletions db/sqlite3/src/sqlite.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ sqlite3_column_blob
sqlite3_column_bytes
sqlite3_column_bytes16
sqlite3_column_count
sqlite3_column_decltype
sqlite3_column_decltype16
sqlite3_column_double
sqlite3_column_int
sqlite3_column_int64
Expand Down
10 changes: 0 additions & 10 deletions storage/mozIStorageStatement.idl
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ interface mozIStorageStatement : mozIStorageBaseStatement {
*/
unsigned long getColumnIndex(in AUTF8String aName);

/**
* Obtains the declared column type of a prepared statement.
*
* @param aParamIndex
* The zero-based index of the column who's declared type we are
* interested in.
* @return the declared index type.
*/
AUTF8String getColumnDecltype(in unsigned long aParamIndex);

/**
* Reset parameters/statement execution
*/
Expand Down
13 changes: 0 additions & 13 deletions storage/mozStorageStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,19 +652,6 @@ Statement::GetState(int32_t *_state)
return NS_OK;
}

NS_IMETHODIMP
Statement::GetColumnDecltype(uint32_t aParamIndex,
nsACString &_declType)
{
if (!mDBStatement)
return NS_ERROR_NOT_INITIALIZED;

ENSURE_INDEX_VALUE(aParamIndex, mResultColumnCount);

_declType.Assign(::sqlite3_column_decltype(mDBStatement, aParamIndex));
return NS_OK;
}

////////////////////////////////////////////////////////////////////////////////
//// mozIStorageValueArray (now part of mozIStorageStatement too)

Expand Down
15 changes: 0 additions & 15 deletions storage/test/unit/test_storage_statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,6 @@ function test_state_after_finalize()
do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_INVALID, stmt.state);
}

function test_getColumnDecltype()
{
var stmt = createStatement("SELECT name, id FROM test");
do_check_eq("TEXT", stmt.getColumnDecltype(0));
do_check_eq("INTEGER", stmt.getColumnDecltype(1));
try {
do_check_eq("GARBAGE", stmt.getColumnDecltype(2));
do_throw("should not get here");
} catch (e) {
do_check_eq(Cr.NS_ERROR_ILLEGAL_VALUE, e.result);
}
stmt.finalize();
}

function test_failed_execute()
{
var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
Expand Down Expand Up @@ -181,7 +167,6 @@ var tests = [test_parameterCount_none, test_parameterCount_one,
test_getColumnName, test_getColumnIndex_same_case,
test_getColumnIndex_different_case, test_state_ready,
test_state_executing, test_state_after_finalize,
test_getColumnDecltype,
test_failed_execute,
test_bind_undefined,
];
Expand Down

0 comments on commit 94cb1bf

Please sign in to comment.