示例#1
0
        void Export_GetConditionString(SQLiteDataReader rdr, StringBuilder sb)
        {
            bool isFirst = true;

            for (int i = 0; i < rdr.FieldCount; i++)
            {
                string colName = rdr.GetName(i);

                var col = Columns[colName];

                if (col.IsPrimaryKey)
                {
                    if (isFirst)
                    {
                        isFirst = false;
                    }
                    else
                    {
                        sb.Append(" AND ");
                    }

                    sb.Append("`");
                    sb.Append(colName);
                    sb.Append("`=");
                    sb.Append(QueryExpress.ConvertToSqlFormat(rdr, i, true, true, col));
                }
            }
        }
示例#2
0
        string Export_GetValueString(SQLiteDataReader rdr)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < rdr.FieldCount; i++)
            {
                if (sb.Length == 0)
                {
                    sb.AppendFormat("(");
                }
                else
                {
                    sb.AppendFormat(",");
                }

                sb.Append(QueryExpress.ConvertToSqlFormat(rdr, i, true, true, Columns[rdr.GetName(i)]));
            }

            sb.AppendFormat(")");

            return(sb.ToString());
        }