Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 13 03:07
    kingketo closed #2014
  • Jun 13 03:07
    kingketo commented #2014
  • Jun 12 19:39
    alehofmann opened #2016
  • Jun 12 19:39
    alehofmann labeled #2016
  • Jun 11 06:43
    mifriis closed #2015
  • Jun 11 06:43
    mifriis commented #2015
  • Jun 10 13:56
    mifriis commented #2011
  • Jun 10 13:53
    mifriis labeled #2015
  • Jun 10 13:53
    mifriis opened #2015
  • Jun 10 10:09
    batmanonline commented #2013
  • Jun 10 01:16
    kingketo edited #2014
  • Jun 10 01:16
    kingketo labeled #2014
  • Jun 10 01:16
    kingketo opened #2014
  • Jun 09 10:53
    kampilan opened #2013
  • Jun 09 10:53
    kampilan labeled #2013
  • Jun 09 05:12
    kgday commented #1827
  • Jun 08 02:20
    zenchanhk closed #2012
  • Jun 08 02:20
    zenchanhk commented #2012
  • Jun 07 20:35
    mbdavid commented #2012
  • Jun 07 20:33
    mbdavid commented #978
Ruslan Mogilevskiy
@ruslanmogilevskiy
tried with Foo.Bar[*]... doesn`t work as well
is there any documentation related to any/all out there? Found nothing neither in query samples nor in wiki\docs\api documentation
square brackets looks like its for a list
did you try {} for doc/dict?
also seem syou should start with $.Bar
it's Evidenty not very active here. Try on a programming/c# discord
Ruslan Mogilevskiy
@ruslanmogilevskiy
do you mean Bar{*}.k1 any in '1'? - query format error
Start the query with $. doesn`t work as well
Amleto
@Amleto
well theres no example at all that starts with a property name
Ruslan Mogilevskiy
@ruslanmogilevskiy
yeh ((
Amleto
@Amleto
actually:
"The $ symbol are optional and default in document navigation (Address.Street works too)"
Ruslan Mogilevskiy
@ruslanmogilevskiy
ok, thanks mate, will try my luck on github issues
Amleto
@Amleto
get on discord is my advice
Ruslan Mogilevskiy
@ruslanmogilevskiy
do you have the link for discord channel for litedb?
Amleto
@Amleto
there isn't specific litedb, but I have found this to be a good one
https://discord.gg/csharp
Ruslan Mogilevskiy
@ruslanmogilevskiy
litedb has a unique sql/query syntax so generic c# developer (I am) wont help. Without clear documentation, only litedbs authors know to deal with this
Amleto
@Amleto
or people that have used it... of which you are likely to find on the server
Ruslan Mogilevskiy
@ruslanmogilevskiy
thank you, will try
alb3ric
@alb3ric:matrix.org
[m]
Hello, I have a question concerning shrink (or rebuild). I have a litdb database (4.1.4) with only one collection, in this collection I save datas, that I keep 5 days (every day I delete all the items older than 5 days). My question is what happen about the index ? is it going to keep growing if i don't shrink my database sometimes ? (the application is a windows service that never stop, and the database is continously written) | Thanks for your help :p
alb3ric
@alb3ric:matrix.org
[m]
any help ? :)
cam-coding
@cam-coding
I wonder if anyone has ideas on my issue. A user runs my first application in admin mode, which creates my LiteDB with admin rights. Then in a second application (where they user cannot run the application in admin mode) they are unable to access the DB due to permission issues. Is there anything I can do on DB creation to change this? Or do I need to create the DB normally then find an alternate way of changing the file permissions?
Amleto
@Amleto
If you have an ILitecollection<T>, and it has data for some T (t1, say) with id=1. Then I make a new T (t2, say), set t2.id=1, and change one property on t2. How do I merge that one property into the collection?
Haseeb Iftikhar
@haseeb.iftikhar:matrix.org
[m]
I am getting "The process cannot access the file because it is being used by another process." exception in windows service while using litedb 5.0.8 version.
Helmut Wahrmann
@hwahrmann

i've got 2 questions:

  1. is there a way to influence the file size of the DB. My database is 780MB big compared to 350MB for the same data/index in sqlite

  2. i am inserting 1.8 million documents/rows having 4 fields, the _id and 3 others which need to be indexed.
    inserting them in bulks of 100k and then doing an EnsureIndex on the 3 fields gives me a runtime of roughly 5 minutes
    having the EnsureIndex in place before i start the bulkinsert gives me 9:30 minutes

    Is there a difference in query performance, foing it with method 1 or 2?

Arshel Melfor
@arshel
hey maybe a stupid question but what can mac users use as a alternative to litedb.studio?
jeeshenlee
@jeeshenlee_twitter

I am getting "The process cannot access the file because it is being used by another process." exception in windows service while using litedb 5.0.8 version.

You will need to add connection=shared in the connection string

Refer mbdavid/LiteDB#1453

tleylan
@tleylan
Hi. I just dl'd LiteDB Studio v1.0.2.0 and tried to open an existing DB (created by the NEOS app). I get an error dialog "Ticks must be between DateTime.MinValue.Ticks... etc." Any idea what the issue might be? And is there a way to identify the DB version from the DB file, maybe that's the problem? Thanks.
hidemat
@hidemat
Hello! Hope it's ok to post a noob question here. Does anyone know of a good way to implement full text search using liteDB and a third party search engine (lucene.Net, etc.)?
John Harris
@johncharris
How big of a database does litedb support? I'm thinking about switching over to it so I have have something easy to install, eg no server dependencies. Are there any issues with multiple users as asp.net core?
Aristote Ngoy
@harriscreativity
is possible to sync litedb to cloud using azure mobile sync
AliAbuHilu
@AliAbuHilu
boa tarde estou susando o liteDB e estamos com dificuldades de obter acesso ao banco pela aplicação rodando em servidor quando o usuário que está acessando não é administrador. Alguém ja passou por isso ?
Falha ao Gravar Registro -[10], [System.UnauthorizedAccessException: O acesso ao caminho 'Global\FFBAB3EC7319D08E60E44B4EA5FA83570C27F817.Mutex' foi negado. || em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) || em System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData) || em System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) || em System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs) || em System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity) || em LiteDB.SharedEngine..ctor(EngineSettings settings) || em LiteDB.ConnectionString.CreateEngine() || em LiteDB.LiteDatabase..ctor(ConnectionString connectionString, BsonMapper mapper) || em RegStatusMonitor.Status.gravaPing(Int32 codigo_status, String valor_status)]
tleylan
@tleylan
Nice to see all the questions... now if we could get an answer or two
Jota Lanusse
@jotalanusse

Hi there, I have a problem while loading a nested object from the DB:

public class Audio
    {
        public Guid Id { get; }
        public string Path { get; }

        public Audio(Guid id, string path)
        {
            Id = id;
            Path = path;
        }
    }

public class Sound
    {
        public Guid Id { get; }
        [BsonField("audio")]
        [BsonRef("audio")]
        public Audio Audio { get; set; }

        public Sound(Guid id, Audio audio)
        {
            Id = id;
            Audio = audio;
        }
    }

ILiteCollection<Sound> soundCollection = db.GetCollection<Sound>("sound");

soundCollection.Insert(new Sound(Guid.NewGuid(), new Audio(Guid.NewGuid(), "path1")));
soundCollection.Insert(new Sound(Guid.NewGuid(), new Audio(Guid.NewGuid(), "path2")));

List<Sound> allSounds = new List<Sound>();
allSounds.AddRange(soundCollection.FindAll().ToList()); // Error here

Exception:

Prism.Ioc.ContainerResolutionException
  HResult=0x80131500
  Message=An unexpected error occurred while resolving 'SoundMod.ViewModels.MainWindowViewModel'
  Source=Prism.Unity.Wpf
  StackTrace:
   at Prism.Unity.UnityContainerExtension.Resolve(Type type, ValueTuple`2[] parameters)
   at Prism.Unity.UnityContainerExtension.Resolve(Type type)
   at Prism.PrismInitializationExtensions.<>c.<ConfigureViewModelLocator>b__0_0(Object view, Type type)
   at Prism.Mvvm.ViewModelLocationProvider.AutoWireViewModelChanged(Object view, Action`2 setDataContextCallback)
   at Prism.Mvvm.ViewModelLocator.AutoWireViewModelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Prism.Mvvm.ViewModelLocator.SetAutoWireViewModel(DependencyObject obj, Nullable`1 value)
   at Prism.Common.MvvmHelpers.AutowireViewModel(Object viewOrViewModel)
   at Prism.PrismApplicationBase.Initialize()
   at Prism.PrismApplicationBase.InitializeInternal()
   at Prism.PrismApplicationBase.OnStartup(StartupEventArgs e)

The problem seems to be that the constructor of Sound has Audio as a parameter, so how can I make it work?
How can I make LiteDB return a List<Sound> that also retrieves and auto-generates from the DB the Audio object that each Sound object contains?

Torben Stallknecht
@stallemanden

Nice to see all the questions... now if we could get an answer or two

Yeah, It would be awesome. Seems the developer is not that active, and other users have little to no input.

Jota Lanusse
@jotalanusse

is possible to sync litedb to cloud using azure mobile sync

What do you mean by "Sync"? You could store the .db file in a remote server I guess

1 reply

I am getting "The process cannot access the file because it is being used by another process." exception in windows service while using litedb 5.0.8 version.

Are you running multiple instances of your app? Or are you using LiteDB Studio to test your app? Make sure if you are doing either of those things to set the connection type to "shared" in the connection string, so that after each intercation with the DB the connection is closed. That way you can have multiple connections to the same .db file: https://www.litedb.org/docs/connection-string/

Jota Lanusse
@jotalanusse

I wonder if anyone has ideas on my issue. A user runs my first application in admin mode, which creates my LiteDB with admin rights. Then in a second application (where they user cannot run the application in admin mode) they are unable to access the DB due to permission issues. Is there anything I can do on DB creation to change this? Or do I need to create the DB normally then find an alternate way of changing the file permissions?

Is the file being created in a protected folder? Try creating the .db file somewhere every user can access it

arturcortellijunior
@arturcortellijunior
I am getting "Most likely the file will become too long or the handle was not opened to support synchronous IO operations" exception in windows service
1 reply
version 5.0.10
arturcortellijunior
@arturcortellijunior
Another error i get: "LiteDB ENSURE: page type must be data page"
amiolcosta
@amiolcosta
How do I convert this LITEBD studio query "SELECT @key AS Time FROM LogsObjects
GROUP BY (YEAR(Time)100 + MONTH(Time))100 + DAY(Time)" to a similar query made with c# "var query = LogExTable.Query().GroupBy(BsonExpression.Create("((YEAR($.Time)100 + MONTH($.Time))100 + DAY($.Time))")).Select(BsonExpression.Create("@Key AS $.Time")).ToList();" I know that the Select Expression is Wrong
RLabs
@RLabs_Riccardo_twitter
hi all, is possible use litedb with blazor webassembly? better use litedb or litedb.core?
Monaldcry7788
@Monaldcry7788
Hi, how can I sync two or more databases?
Lunar Digital Assets
@hanyoonLDA
Hi yall, I'm assuming there's no API wrapper for LiteDB <> Python?
Tim Moore
@tjmoore
Hi, I have an application with dynamic loading of assemblies for a plugin type architecture, and a collection on a base class that serialises derived types. Are there any recommended ways of handling deserialisation where the assembly might not be loaded? At present doing a FindAll on the collection will throw an exception because it can't deserialise some documents. Obviously that's intended, but I'm looking for a way to ignore those for my purposes.
dvyas
@dvyas

Hi All, I am investigating LiteDB for one of the use case and have few questions

1) DB library supports multi threading or not and what level of locking is supported, is it db level or table/collection level or record level.
2) Does it support transactions like commit or rollback operations?
3) Does it support indexes? if index is supported how much memory does it consume and how much disk space it consumes?
4) DB should be reliable, sudden crash of process should not result in DB file corruption.
5)startup time of DB must be within 1-5secs
6) DB library foot print should be between 2MB to 25MB ( binary file size and when loaded in to memory ideal case: it shd consume not more than 2MB)
b. Measure the increase in memory size when a model is loaded. Say a model file is 2MB then memory image of the same should not more than 10MB.
7) DB logs enable/disable should be there

RLabs
@RLabs_Riccardo_twitter
with this code i get error that string.compare is not supported, what i must use?
            Configurazione dati_db = GetDbTable()
                .FindOne(x =>
                    string.Compare(x.Password, password, StringComparison.OrdinalIgnoreCase) == 0 &&
                    (string.Compare(x.UserName, user, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(x.Email, email, StringComparison.OrdinalIgnoreCase) == 0));
arturcortellijunior
@arturcortellijunior
Hi, sometimes I get the error below to access a database.
It can only be corrected when creating a new one.
Does anyone know why this happens and how to recover the data that was left in the old database?
Invalid Data on 3165995326. Full zero: False. Page Type: 181. Prev/Next: 1231292982/2490937806. UniqueID: 95. ShareCounter: 1.