Coder Social home page Coder Social logo

lanwin / sqlite-net-compactframework Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 5.0 1.3 MB

.Net Compact Framework port of sqlite-net. A small library to easily access SQLite databases from .NET/Mono/MonoTouch applications.

Home Page: http://code.google.com/p/sqlite-net/

C# 2.01% C 97.99%

sqlite-net-compactframework's People

Contributors

escobar5 avatar lanwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sqlite-net-compactframework's Issues

NotSupportedException

Exception:"notsupportedException"
SQLite.SQLite3.ColumnDouble(IntPtr stmt, Int32 index)
SQLite.SQLiteCommand.ReadCol(IntPtr stmt, Int32 index, ColType type, Type clrType)
SQLite.SQLiteCommand.ExecuteQuery[T](TableMapping map)
SQLite.SQLiteCommand.ExecuteQueryT
SQLite.TableQuery`1.GetEnumerator()

test entity:

public class EntityStock
{
    [PrimaryKey, AutoIncrement]
    public int Id { get; set; }
    [MaxLength( 8 )]
    public string Symbol { get; set; }

    public override string ToString( ) {return Symbol;   }
}

public class EntityValuation
{
    [PrimaryKey, AutoIncrement]
    public int Id { get; set; }
    [Indexed]
    public int StockId { get; set; }
    public DateTime Time { get; set; }
    public double Price { get; set; }

    public override string ToString( )
    {
        return string.Format( "{0:yyyy-MM-dd} {1:C}", Time, Price );
    }
}

test method:

private void GetStock( string stockSymbol )
{
    var stock = _db.QueryStock( stockSymbol );
    foreach ( var v in _db.QueryValuations( stock ) )
    {
        lbx.Items.Add( "   " + v.ToString( ) );
    }
}

public IEnumerable<EntityValuation> QueryValuations( EntityStock stock )
{
    return Table<EntityValuation>( ).Where( x => x.StockId == stock.Id );
}

error in sqlite.cs:

public IEnumerator<T> GetEnumerator( )
{
    return GenerateCommand( ).ExecuteQuery<T>( ).GetEnumerator( );
}

public List<T> ExecuteQuery<T>( ) where T : new( )
{
    return ExecuteQuery<T>( _conn.GetMapping( typeof( T ) ) );
}

public List<T> ExecuteQuery<T>( TableMapping map ) { }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.