/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Check to see if there's a parameter with this name.
nsCOMPtr<nsIVariant> variant(convertJSValToVariant(aCx, aValue)); if (!variant) {
aRv.Throw(NS_ERROR_UNEXPECTED); return;
}
aRv = mStatement->BindByName(name, variant);
}
void StatementParams::GetSupportedNames(nsTArray<nsString>& aNames) { if (!mStatement) { return;
}
for (uint32_t i = 0; i < mParamCount; i++) { // Get the name of our parameter.
nsAutoCString name;
nsresult rv = mStatement->GetParameterName(i, name); if (NS_WARN_IF(NS_FAILED(rv))) { return;
}
// But drop the first character, which is going to be a ':'.
name = Substring(name, 1);
aNames.AppendElement(NS_ConvertUTF8toUTF16(name));
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.