void Parameterize(SqliteParameterCollection command, object idValue)
 {
     if (null != idValue)
     {
         var pkf = PrimaryKeyField;
         if (!command.Contains(pkf))
         {
             var p = new SqliteParameter("@" + pkf, idValue);                    
             command.Add(p);
         }
         else
         {
             command[PrimaryKeyField].ResetDbType();
             command[PrimaryKeyField].Value = idValue;
         }
     }
 }
 void Parameterize(SqliteParameterCollection command, RuntimeDefinedParameterDictionary parameterDictionary)
 {
     if (null != parameterDictionary)
     {
         foreach (SqliteParameter parameter in command)
         {
             string name = parameter.ParameterName.TrimStart('@', '$');
             if (! (parameterDictionary.ContainsKey(name) && parameterDictionary[name].IsSet) )
             {
                 continue;
             }                    
             SpecifyParameter(command, parameter.ParameterName, parameterDictionary[name].Value);
         }
     }
 }
 void Parameterize( SqliteParameterCollection command, DataRow record )
 {
     if (null != record)
     {
         foreach (SqliteParameter parameter in command)
         {
             string name = parameter.ParameterName.TrimStart('@', '$');
             if (!record.Table.Columns.Contains(name))
             {
                 continue;
             }
             SpecifyParameter( command, parameter.ParameterName, record[name] );
         }
     }
 }
 void Parameterize(SqliteParameterCollection command, PSObject item)
 {
     if (null != item)
     {
         foreach (SqliteParameter parameter in command )
         {
             string name = parameter.ParameterName.TrimStart('@', '$');
             var prop = item.Properties.Match(name).FirstOrDefault();
             if (null == prop)
             {
                 continue;
             }
             SpecifyParameter(command, parameter.ParameterName, prop.Value);
         }
     }
 }
 void SpecifyParameter( SqliteParameterCollection parameters, string parameterName, object value )
 {
     parameters[parameterName].ResetDbType();
     parameters[parameterName].Value = value;
     var isSpecifiedName = parameterName + "IsSpecified";
     if( parameters.Contains( isSpecifiedName ))
     {
         parameters[isSpecifiedName].Value = true;
     }
 }