// Path: src/main/java/com/github/susom/database/MixedParameterSql.java
// static class SecretArg {
//   private final Object arg;
// 
//   SecretArg(Object arg) {
//     this.arg = arg;
//   }
// 
//   Object getArg() {
//     return arg;
//   }
// 
//   @Override
//   public String toString() {
//     return "<secret>";
//   }
// }


import javax.annotation.Nullable;
import org.slf4j.Logger;
import com.github.susom.database.MixedParameterSql.SecretArg;
import oracle.jdbc.OraclePreparedStatement;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.sql.Types;
import java.time.LocalDate;
import java.util.Date;
import java.util.Scanner;
/*
 * Copyright 2014 The Board of Trustees of The Leland Stanford Junior University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.susom.database;






/**
 * Deal with mapping parameters into prepared statements.
 *
 * @author garricko
 */
public class StatementAdaptor {
  private final Options options;

  public StatementAdaptor(Options options) {
    this.options = options;
  }

  public void addParameters(PreparedStatement ps, Object[] parameters) throws SQLException {
    for (int i = 0; i < parameters.length; i++) {
      Object parameter = parameters[i];

      // Unwrap secret args here so we can use them
// Path: src/main/java/com/github/susom/database/MixedParameterSql.java
// static class SecretArg {
//   private final Object arg;
// 
//   SecretArg(Object arg) {
//     this.arg = arg;
//   }
// 
//   Object getArg() {
//     return arg;
//   }
// 
//   @Override
//   public String toString() {
//     return "<secret>";
//   }
// }


// Path: src/main/java/com/github/susom/database/StatementAdaptor.java
import javax.annotation.Nullable;
import org.slf4j.Logger;
import com.github.susom.database.MixedParameterSql.SecretArg;
import oracle.jdbc.OraclePreparedStatement;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.sql.Types;
import java.time.LocalDate;
import java.util.Date;
import java.util.Scanner;

/*
 * Copyright 2014 The Board of Trustees of The Leland Stanford Junior University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.susom.database;






/**
 * Deal with mapping parameters into prepared statements.
 *
 * @author garricko
 */
public class StatementAdaptor {
  private final Options options;

  public StatementAdaptor(Options options) {
    this.options = options;
  }

  public void addParameters(PreparedStatement ps, Object[] parameters) throws SQLException {
    for (int i = 0; i < parameters.length; i++) {
      Object parameter = parameters[i];

      // Unwrap secret args here so we can use them
      if (parameter instanceof SecretArg) {