Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete function error #37

Open
muhammedkoramaz opened this issue Oct 15, 2020 · 1 comment
Open

delete function error #37

muhammedkoramaz opened this issue Oct 15, 2020 · 1 comment

Comments

@muhammedkoramaz
Copy link

database design

{
    "files": [{
            "projectName": "Project1",
            "filePath": "/home/koramaz/Belgeler/htdocs/eticaret/css/owl.transitions.css",
            "fileName": "owl.transitions.css",
            "id": 1602791652333
        },
        {
            "projectName": "Project2",
            "filePath": "/home/koramaz/Masaüstü/Proman/images/delete.png",
            "fileName": "delete.png",
            "id": 1602791655161
        }
    ]
}

delete function

function deleteFile(fileName, projectName) {
    var deleteObject = new Object();
    deleteObject.fileName = fileName;
    deleteObject.projectName = projectName;


    console.log(fileName);
    db.deleteRow('files', appPath, deleteObject, (succ, msg) => {
        document.getElementById(fileName).remove();
        console.log(msg);
    });
}

When I send this object to the delete function, the deletion works inconsistently. Values ​​that do not match the parameter I sent are also deleted.

@alexiusacademia
Copy link
Owner

Hello and thank you!

Could you send some data for me to recreate that scenario? Thanks!

isidoor pushed a commit to isidoor/electron-db that referenced this issue Nov 28, 2020
@isidoor isidoor mentioned this issue Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants